package com.by.auto.token;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "token")
public class TokenProperties {

    private final long DEFAULT_TIME = 30 * 60 * 1000; //默认30分分钟
    private final String DEFAULT_SECRET = "2d003741-b438-49c7-8626-01590814e518";//默认密钥

    long validTime; //单位是分钟

    String secret; //密钥

    public TokenProperties() {
        this.validTime = DEFAULT_TIME;
        this.secret = DEFAULT_SECRET;
    }

    public long getValidTime() {
        return validTime;
    }

    public void setValidTime(long validTime) {
        this.validTime = validTime;
    }

    public String getSecret() {
        return secret;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }
}
